package com.a.server.controller;

import com.a.server.service.feign.BserverFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Project: kim-sleuth-zipkin
 * @PackageName: com.a.server.controller
 * @FileName: AserverController.java
 * @Description: The AserverController is...
 * @Author: kimwu
 * @Time: 2021-01-04 17:01:06
 */
@RestController
@RequestMapping("/a")
@Slf4j
public class AserverController {

    @Resource
    private BserverFeignService bserverFeignService;

    @PostMapping("/im")
    public String im(){
        return "im";
    }

    @PostMapping("/noMean")
    public String noMean(){
        String s = bserverFeignService.noMean();
        return "ok";
    }

    @PostMapping("/flowControl")
    public String flowControl() {
        String server = bserverFeignService.flowControl();
        log.info("返回值 {}", server);
        return "ok";
    }

    @PostMapping("/timeout")
    public String timeout() {
        String server = bserverFeignService.timeout();
        log.info("返回值 {}", server);
        return "ok";
    }

    @PostMapping("/abnormalProportion")
    public String abnormalProportion() {
        String server = bserverFeignService.abnormalProportion();
        log.info("返回值 {}", server);
        return "ok";
    }

    @PostMapping("/abnormalNumber")
    public String abnormalNumber() {
        String server = bserverFeignService.abnormalNumber();
        log.info("返回值 {}", server);
        return "ok";
    }

}
